home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0909 / doslfnbk.txt < prev    next >
Text File  |  1997-04-12  |  37KB  |  765 lines

  1. DOSLFNBK v 2.1 - Backs up/restores Win95 long filenames in DOS
  2.  
  3. Copyright (c) 1995,1997 D.J. Murdoch.
  4.  
  5. 0. Contents of this file
  6.  
  7.    1. Syntax
  8.    2. Description
  9.    3. Details
  10.    4. Memory Limitations
  11.    5. Safety
  12.    6. Recovery from Total Disk Failure
  13.    7. License
  14.    8. Release History
  15.    9. Acknowledgments
  16.  
  17. 1. Syntax:
  18.  
  19.       DOSLFNBK drive:directory [options]
  20.  
  21.         will back up all the long filename records in the named
  22.         directory and subdirectories of it to a file called
  23.         BACKUP.LFN.
  24.  
  25.       Options:
  26.         /all         Back up all filenames, not just LFNs and unusual
  27.                      attributes
  28.         /f filename  Back up to this file instead (default .LFN
  29.                      extension)
  30.         /force       Force DOSLFNBK to go ahead without asking questions,
  31.                      even when it may be unsafe
  32.         /from pathname  Restore names from this path
  33.         /l           List contents of backup file
  34.         /na          No attributes:  don't back up or restore attributes
  35.         /nf          No full restore check
  36.         /nr          No recursive:  don't do subdirectories
  37.         /nt          Don't restore times from LFN backup
  38.         /o           Always overwrite existing LFNs
  39.         /orphans     Go ahead if LFN damage is found
  40.         /p           Prompt before each filename restore (ignored
  41.                      during saves)
  42.         /r           Restore from existing backup
  43.         /s directory Skip directory
  44.         /v           Give running status report
  45.         /d filename  Write a detailed debugging log to filename
  46.  
  47.       Examples:
  48.  
  49.         For recovery from a total disk failure, see section 6 below.
  50.  
  51.         To back up every long filename on the disk into BACKUP.LFN:
  52.  
  53.            doslfnbk c:\
  54.  
  55.         To restore just the Windows directory and subdirectories:
  56.  
  57.            doslfnbk c:\windows /r
  58.  
  59.         To restore just the root directory, but no subdirectories:
  60.  
  61.            doslfnbk c:\ /r /nr
  62.  
  63.         To backup everything except the MS Internet Explorer cache and
  64.         history directories:
  65.  
  66.    doslfnbk c:\ /s \progra~1\micros~1\cache /s \progra~1\micros~1\history
  67.  
  68.         To backup the current directory and subdirectories:
  69.  
  70.            doslfnbk .
  71.  
  72.         To restore the "Program Files" directory name and its
  73.         subdirectories, you need two runs:
  74.  
  75.            doslfnbk c:\PROGRA~1 /r
  76.            doslfnbk c:\ /r /p /nr
  77.  
  78.         On the second run, you'll be prompted for each name to restore;
  79.         just say yes when you see "Program Files".
  80.  
  81.         To see what filenames in the "Program Files" directory and its
  82.         subdirectories are in the current BACKUP.LFN file:
  83.  
  84.            doslfnbk c:\PROGRA~1 /l
  85.  
  86.         To restore names from files that were originally in
  87.         D:\OriginalDir (short name \ORIGIN~1) but which are now in
  88.         E:\CurrentDir:
  89.  
  90.            doslfnbk e:\CurrentDir /r /from \ORIGIN~1
  91.  
  92.         To get a listing of every file on your disk, including
  93.         attributes, sizes and times:
  94.  
  95.            doslfnbk c:\ /all
  96.            doslfnbk /l
  97.  
  98. 2. Description:
  99.  
  100.         Microsoft's Windows 95 introduces long filenames (LFNs), and
  101.         they are mostly compatible with old software.  However, there
  102.         are some problems.  Old backup programs don't recognize LFNs, so
  103.         they don't get properly backed up.  Worse, the Win95 backup
  104.         program doesn't support a lot of common backup hardware (e.g.
  105.         Colorado Memory Systems tape drives using accelerator cards) and
  106.         won't run in DOS mode, so recovery from a catastrophic disk
  107.         failure can be really difficult.
  108.  
  109.         To address this problem, Microsoft put a program called LFNBK on
  110.         the Win95 CD ROM to back up your LFNs.  However, it's very
  111.         inconvenient to use.  It requires changes to your Control Panel
  112.         settings before and after use, and it works by stripping all the
  113.         LFNs off your disk --- so you need to restore them again after
  114.         you've done your backup to tape.  It will only run after Win95
  115.         has booted, so again you've got big problems after a
  116.         catastrophic disk failure.  If you've got a program that is
  117.         completely incompatible with LFNs then you might want to use
  118.         LFNBK, but for routine system backups it's too much of a pain.
  119.  
  120.         I wrote DOSLFNBK to address these problems.  It runs in any
  121.         version of DOS that can see your disk, and can both backup and
  122.         restore your files there.  During backup, it makes no changes to
  123.         the names, so you can routinely run it just before a tape backup
  124.         and not have to undo the damage afterwards.  It also allows
  125.         partial backups and partial restores; I'm pretty sure LFNBK is
  126.         an all-or-nothing affair.
  127.  
  128.         The downside of DOSLFNBK is that it has to work on the disk
  129.         below the file system level.  This means that it needs to lock
  130.         the disk to make sure no other programs are writing to the disk
  131.         while it is running.  This may cause errors in the other
  132.         programs; I recommend shutting them down before running
  133.         DOSLFNBK, or running it in a single-tasking DOS session.
  134.  
  135. 3. Details:
  136.  
  137.    Contents of this section:
  138.  
  139.           - what DOSLFNBK does
  140.           - how to specify which directory to back up
  141.           - how to specify which directory to restore from
  142.           - existing long filenames and the /o option
  143.           - date information
  144.           - changed files
  145.           - file attributes and the /na and /nf options
  146.           - the /v verbose option and the /d debug option
  147.           - the /all option to back up all filenames
  148.           - the /force option to ignore warnings
  149.           - the /orphans option for damaged directories
  150.           - the /s option to skip directories
  151.           - large directories
  152.           - the LOCK and UNLOCK commands
  153.           - the irritating jump to full screen
  154.           - DOSLFNBK, disk defragmenters and directory sort utilities
  155.           - DOSLFNBK and XCOPY
  156.           - exit codes
  157.  
  158.  
  159.    - what DOSLFNBK does
  160.  
  161.         When doing a backup, DOSLFNBK reads the directories on the disk
  162.         and writes copies of all of the LFN records to the binary
  163.         BACKUP.LFN file (or whatever file you specify with /f).  If you
  164.         use the /nr option, it will work only on the specified
  165.         directory; otherwise, it saves those entries as well as
  166.         everything in any subdirectory below it.
  167.  
  168.    - how to specify which directory to back up
  169.  
  170.         Relative directory specifications are supported, and DOSLFNBK
  171.         understands SUBST to some extent.  (I believe it's possible with
  172.         a complicated network of SUBST, JOIN, etc. to confuse it; don't
  173.         do that!)
  174.  
  175.         The directory name itself won't be backed up or restored; only
  176.         the files and subdirectories within it. There is no way to
  177.         specify a subset of the files; you have to use the /p prompting
  178.         option if you want this.
  179.  
  180.         The original drive letter is not stored in BACKUP.LFN, so you
  181.         can use DOSLFNBK to save the long filenames on one drive, use a
  182.         DOS utility to move them to another drive, and then restore the
  183.         filenames there.
  184.  
  185.    - how to specify which directory to restore from
  186.  
  187.         By default DOSFLBNK will restore to the same
  188.         full path as was originally backed up.  To restore to a
  189.         different target directory, use the /from option.  The name
  190.         given in the /from option should be the original directory name
  191.         fully specified in 8.3 format, with no drive letter.  For
  192.         example, if you back up E:\OriginalDir, you should restore using
  193.         the option "/from \ORIGIN~1".  If you forget the 8.3 form, use
  194.         the /L option to list the backup file to see it.
  195.  
  196.    - existing long filenames and the /o option
  197.  
  198.         DOSLFNBK will normally not overwrite an existing LFN with a
  199.         different one; you should rename the file to its 8.3 alias
  200.         before running if you want to restore an old name, or run with
  201.         the /p option for individual prompting, or the /o option to
  202.         force overwrites.  These two options are mutually exclusive.
  203.  
  204.         Some DOS versions (e.g. Hebrew DOS) store special characters for
  205.         short filenames in records that are identical to long filename
  206.         records.  To restore the true long filenames in these DOS
  207.         versions, you *must* use either the /p or the /o option.
  208.         Similarly, Win95 sometimes generates LFNs when you copy files
  209.         with special characters (e.g. accented letters).  If you have
  210.         moved or manipulated these files in Win95, you'll need to
  211.         overwrite these generated LFNs.
  212.  
  213.         Win95 sometimes creates LFNs for files with special characters
  214.         in the names, even if the name is otherwise pure 8.3 form.  I
  215.         suspect this is to allow compatibility across code pages:  the
  216.         LFN will use the Unicode character encoding, while the 8.3
  217.         record depends on the code page.  DOSLFNBK will handle these
  218.         properly for code page 437 (the standard US code page), but it
  219.         may fail to restore some filenames containing special characters
  220.         in other code pages, because it will think they are valid LFNs.
  221.         Use /p or /o to force a restore of these names as well.
  222.  
  223.    - date information
  224.  
  225.         Normally, DOSLFNBK will restore the backed up date information,
  226.         since older DOS versions and DOS utilities probably don't save
  227.         this properly.  You can override this behaviour by using the /nt
  228.         switch.
  229.  
  230.    - changed files
  231.  
  232.         If during a restore, DOSLFNBK detects that the file size has
  233.         changed, you'll be prompted as to whether you want to restore
  234.         the LFN or not.  If you choose to restore it, the date
  235.         information will *not* be restored, as it is probably incorrect.
  236.  
  237.    - file attributes and the /na and /nf options
  238.  
  239.         Many backup programs don't handle Win95 file attributes properly.
  240.         They will skip hidden files or hidden directories, or change the
  241.         attributes upon restore.  Since some of the special features of
  242.         directories in Win95 depend on the attributes, this can cause
  243.         problems after a restore.  To avoid this, DOSLFNBK does two
  244.         things:  First, it checks that every directory and file recorded
  245.         in the backup file exists during the restore.  If any are
  246.         missing, it prints a warning message.  To skip this check, use
  247.         the /nf (no full restore) option.
  248.  
  249.         The second thing done to protect against attribute-challenged
  250.         programs is to store information on files with any unusual
  251.         attributes, whether they have long filenames or not.  These
  252.         include System, Hidden and Readonly files and directories, and
  253.         also files using two directory attribute bits that are not
  254.         normally used. During a restore, DOSLFNBK will restore any
  255.         attribute bits except the SubDirectory and Volume attributes
  256.         (because changing these would damage the disk structure) and the
  257.         Archive attribute (because this is typically used to signal
  258.         whether a file is backed up or not; one would expect it to
  259.         change after a backup).
  260.  
  261.         If you don't want this special handling of attributes, use the
  262.         /na option.  Only long filename records will be backed up, and
  263.         during a restore the file attributes of the file on the disk
  264.         will be kept.
  265.  
  266.    - the /v verbose option and the /d debug option
  267.  
  268.         To show you the progress of a run, DOSLFNBK prints a dot for
  269.         about every 10 directories examined or (in /v mode) prints the
  270.         directory and file names.  If it stops printing for more than a
  271.         few seconds, something is probably wrong.  Try running again
  272.         with the /d debug log option, and if it stops again, please
  273.         email me (dmurdoch@mast.queensu.ca) a copy of your log, along
  274.         with a description of your system.  I'm very interested in
  275.         making DOSLFNBK as bug-free as possible.
  276.  
  277.    - the /all option to back up all filenames
  278.  
  279.         Sometimes you may want a record of the names of every file on
  280.         the disk.  An easy way to get this is to run DOSLFNBK with the
  281.         /all option.  This will save the directory descriptions of every
  282.         file and subdirectory on your disk.  To view the listing, run
  283.         again with the /l option.  You can also make use of this during
  284.         the restore to detect files that have changed since the backup,
  285.         or files that were missed in a restore.
  286.  
  287.    - the /force option to ignore warnings
  288.  
  289.         The /force option tells DOSLFNBK to go ahead without stopping
  290.         for several different warnings (e.g. overwriting the backup
  291.         file).  Use it in a batch file only when you're sure you always
  292.         want it to go ahead.
  293.  
  294.    - the /orphans option for damaged directories
  295.  
  296.         When damage occurs to a directory (perhaps by an old non-Win95
  297.         compatible program), often the long filename records are left
  298.         "orphaned":  they are no longer connected to any file.  When
  299.         this happens, the best thing to do is to use a disk repair
  300.         program (e.g. SCANDISK) to repair the damage before running
  301.         DOSLFNBK, because DOSLFNBK is written under the assumption that
  302.         the disk structure is intact.
  303.  
  304.         DOSLFNBK makes an attempt to detect orphaned LFNs, and is 99%
  305.         successful.  When it detects any, it will stop and ask you
  306.         whether to continue the operation (the default response is No).
  307.         If you choose to continue a backup, then it will just skip over
  308.         the orphans, and back up everything else.  If you choose to
  309.         continue a restore, it will delete the orphaned records.
  310.         If there is other damage to your disk, it is possible that these
  311.         actions are *not* desirable, and may result in an incomplete or
  312.         unusable backup, or further damage to your disk on a restore.
  313.  
  314.         If you have a lot of damage to your disk and are just trying to
  315.         salvage what you can, you may not want to have to answer Yes to
  316.         all those questions.  In that case, you can use the /orphans
  317.         option, which will make DOSLFNBK go ahead regardless of the
  318.         consequences.
  319.  
  320.         In case it is not clear:  I would personally never use the
  321.         /orphans option, and would almost never answer Yes if orphans
  322.         were detected.  If you do this and your disk ends up in a mess,
  323.         you've only yourself to blame.
  324.  
  325.         What you *should* do is avoid orphans in the first place:  if
  326.         you detect orphans somehow, stop using whatever program created
  327.         them.
  328.  
  329.    - the /s option to skip directories
  330.  
  331.         The /s option tells DOSLFNBK to skip the back up or restore of a
  332.         particular directory.  This is meant as a workaround for the
  333.         memory limitations in DOSLFNBK that are described in section 4
  334.         below.  You can use /s as often as necessary to skip multiple
  335.         directories--the only limit is the command line length.  Note
  336.         that the directory name must be specified using the short
  337.         aliases, e.g. "\PROGRA~1" instead of "\Program files".  Relative
  338.         directory paths using "." and ".." are not supported.  If used
  339.         in combination with the /from option, you should specify the
  340.         *original* path name to skip, not the current one.
  341.  
  342.    - the LOCK and UNLOCK commands
  343.  
  344.         Previous versions of DOSLFNBK used the DOS LOCK and UNLOCK
  345.         commands to lock the disk and prevent errors during restores.
  346.         The current version does this internally.  If you have an old
  347.         batch file that runs LOCK, you'll get warning messages:  "Unable
  348.         to lock drive X:".  Just remove LOCK from the batch file and the
  349.         warnings will go away.
  350.  
  351.    - the irritating jump to full screen
  352.  
  353.         There is one bug in Win95 that the internal locking shows up:
  354.         if you try to restore LFNs to a disk that has any open files on
  355.         it while in a DOS window, the window will suddenly switch to
  356.         full screen.  I don't know of any way to prevent this.
  357.  
  358.    - DOSLFNBK, disk defragmenters and directory sort utilities
  359.  
  360.         You may be tempted to use an older DOS-based disk defragger or
  361.         directory sort utility that doesn't understand long filenames,
  362.         and then use DOSLFNBK to restore the long filenames.  DON'T DO
  363.         THIS! It is extremely likely to cause errors to your directory
  364.         structure which can't be repaired except by hours and hours of
  365.         work.  The problem is that these programs usually leave a few
  366.         files with wrong but apparently correct long filenames.  You'll
  367.         find that 90-95 percent of your disk is restored, but some
  368.         number of files are not.  It is extremely difficult and time
  369.         consuming to find and repair these files.  If you want to use
  370.         these DOS-based programs, you should remove all long filenames
  371.         first (e.g. using LFNBK, or by restoring from tape in DOS).  A
  372.         better solution is to use Win95 compatible versions of these
  373.         utilities.  (Win95 comes with a defragger, and there are shareware
  374.         directory sort utilities available, including mine,
  375.         available in ftp://garbo.uwasa.fi/pc/dirutil as lfnsrt??.zip.)
  376.  
  377.    - DOSLFNBK and XCOPY
  378.  
  379.         I have received several messages from people who have tried to
  380.         use XCOPY and DOSLFNBK to back up their disk to a network drive
  381.         or elsewhere, and then found on restore that Win95 won't boot
  382.         properly.  What appears to be the problem is that the 16 bit
  383.         version of XCOPY does not handle file and directory attributes
  384.         properly.  DOSLFNBK will restore missing attributes, but if a
  385.         file is not there, all it can do is warn you.  As far as I know
  386.         the only way to successfully use XCOPY in a backup scheme is
  387.         with a complicated batch file to remove special attributes
  388.         before the backup.  More details are given in the file
  389.         XCOPY.TXT, which contains messages from several people about
  390.         this problem.
  391.  
  392.    - exit codes
  393.  
  394.         When a run is successful, DOSLFNBK exits with ERRORLEVEL 0.
  395.         When something goes wrong, it prints an error message and exits
  396.         with a higher errorlevel. The currently defined error levels
  397.         are:
  398.  
  399.         99 - Syntax error
  400.         98 - Disk init error
  401.         97 - Disk read error
  402.         96 - Disk write error
  403.         95 - Disk directory error
  404.         94 - Directory init error
  405.         92 - Disk lock error
  406.         91 - Internal error
  407.         89 - Memory error
  408.         88 - Multitasker error
  409.         87 - Overwrite error
  410.         86 - Debug error
  411.         85 - Backup read error
  412.         84 - Backup write error
  413.         83 - Backup open error
  414.         82 - Backup close error
  415.         81 - Some directories were skipped because of low memory
  416.         80 - DOSLFNBK detected an error in the LFN structure on your
  417.              disk.  You should run SCANDISK or another disk repair
  418.              program to do repairs.
  419.  
  420. 4. Memory Limitations:
  421.  
  422.         When running, DOSLFNBK keeps copies of several directories in
  423.         memory at once.  It is written as a real mode DOS program and
  424.         keeps all of this data in the low 640K of memory.  This means
  425.         that in a typical DOS session with 500K of memory available,
  426.         DOSLFNBK will run out of memory when about 15,000 directory
  427.         entries are in memory.  On a restore, up to 3 copies of each
  428.         directory entry may be in memory at once, limiting DOSLFNBK to
  429.         disks with fewer than 5000 directory entries in any branch of
  430.         the directory tree.  (The total number of files on the disk
  431.         doesn't matter; what matters is the number of entries in a
  432.         directory, its parent, grandparent etc., back to the root.)
  433.  
  434.         When I wrote DOSLFNBK, I thought disks approaching this limit
  435.         were very unusual. However, it *is* possible to have such a disk,
  436.         and here's how to find out if you do:
  437.  
  438.         Run your backup with the /V verbose option.  At the end, it
  439.         will print a message something like
  440.  
  441.            Used 255K; restore will require about 264K in DOS session.
  442.  
  443.         If the amount of memory estimated for the restore is more than
  444.         you have available (as reported by the DOS MEM command), you
  445.         might have problems.  You might not; the number reported is
  446.         usually an overestimate.
  447.  
  448.         If it ever turns out that you do run out of memory during a
  449.         restore, you can still restore the LFNs by breaking up the
  450.         restore operation into several steps, restoring different parts
  451.         of your subdirectory tree separately.  In the worst case (more
  452.         than 5000 entries in a single subdirectory), you may have to
  453.         temporarily move files out of the directory and restore the LFNs
  454.         a few thousand (!!) at a time.
  455.  
  456.         Since the original release, it has become clear that there are
  457.         some common situations leading to very large directories. The
  458.         Microsoft Plus! package includes one, and WWW browsers often
  459.         create them while maintaining caches or history lists.
  460.         Unfortunately, the current version of DOSLFNBK doesn't handle
  461.         these very well; it just skips these directories and prints a
  462.         warning message and sets an error level on exit.  I have added
  463.         the /s option to allow you to skip particular directories during
  464.         the backup or restore operation.  A better solution that allows
  465.         all directories to be backed up is in the works.
  466.  
  467. 5. Safety:
  468.  
  469.         DOSLFNBK works with your disk at a level below the file system,
  470.         so if things go wrong during an LFN restore, it's conceivable
  471.         that you could lose whole files or directories.  I've tried to
  472.         make it as safe as I can, but you should follow some simple
  473.         precautions:
  474.  
  475.           - Run Scandisk before DOSLFNBK and get it to fix any errors.
  476.           In particular, if you've run other low level software (e.g. a
  477.           defragger or a directory sorter) that may have messed up the
  478.           LFNs, run Scandisk first.  Better still:  don't use that old
  479.           defragger/directory sorter, because Scandisk may not be able
  480.           to repair all the damage it does.
  481.  
  482.           - Don't turn off or reboot your PC in the middle of a DOSLFNBK
  483.           run.  If there's a power failure or (horrors!) a bug in
  484.           DOSLFNBK forces you to reboot, then Scandisk should be able to
  485.           repair much of the damage.  You may lose some filenames, but
  486.           Scandisk should be able to recover the files themselves.
  487.  
  488.           - If you hit Ctrl-Break or Ctrl-C during a DOSLFNBK restore,
  489.           it shouldn't do any damage other than giving you only a
  490.           partial restore of your LFNs --- but this is *not* a
  491.           well-tested feature, and there may be conditions under which
  492.           you'll suffer worse damage.  Again, Scandisk should be able to
  493.           repair most of it.
  494.  
  495.           - DOSLFNBK was written for version 4.00.950 of Windows 95 (the
  496.           August 1995 release).  It hasn't been tested on the earlier
  497.           beta test versions, or any versions later than the January 96
  498.           fix pack (version 4.00.950a). If the VFAT file structure isn't
  499.           what DOSLFNBK is written for, it could do some real damage.
  500.           The current version is not yet thoroughly tested on FAT32, so
  501.           use it with care. The main reason for this is Microsoft's near
  502.           total lack of support of FAT32 for small developers, and their
  503.           incomplete and incorrect documentation of it.  I would
  504.           recommend avoiding FAT32 if possible; software written for it
  505.           is likely to have many more bugs than should be acceptable.
  506.  
  507.           - There may be special conditions on your system that DOSLFNBK
  508.           doesn't handle.  If you can, try it out when you've got a good
  509.           second backup to make sure it works.  If it doesn't, *please*
  510.           send me details, and I'll attempt to fix it.
  511.  
  512. 6. Recovery from total disk failure:
  513.  
  514.         If your boot disk fails, or you decide to repartition it, then
  515.         you may need to do a full restore from a backup tape.
  516.         Unfortunately, the Win95 backup program provides *no way* to do
  517.         this without re-installing Win95 from the original disks or CD
  518.         ROM.  From reports I've heard, the same is true of most other
  519.         commercial backup programs.
  520.  
  521.         However, if you have a reliable DOS-based backup program,
  522.         DOSLFNBK will let you do a complete restore from a backup.  I've
  523.         only had to do this twice, so these instructions aren't
  524.         guaranteed to cover everything for every system, but they worked
  525.         on mine.
  526.  
  527.         ADVANCE PREPARATIONS:
  528.  
  529.         Before your disk fails (i.e. right now! :-), you need to prepare
  530.         the following:
  531.  
  532.           1. A Win95 startup disk.  If you didn't create one when you
  533.           installed Win95, start the Add/Remove Programs option in
  534.           Control Panel, and click the Startup Disk tab. Then click the
  535.           Create Disk button, and follow the instructions on-screen.
  536.  
  537.           2. A copy of your DOS-based backup/restore program on a floppy
  538.           disk.  It may require EMS memory; if so, you should put
  539.           HIMEM.SYS and EMM386.EXE on your startup disk, and load them
  540.           via CONFIG.SYS.
  541.  
  542.           3. If you use Drivespace disk compression, then you should also
  543.           make sure that the MINI.CAB file from the installation disks
  544.           or the CD ROM is in your Windows directory on the hard disk.
  545.  
  546.           4. A full backup of your disk(s).  Just before creating this,
  547.           run DOSLFNBK to save all of your long filenames.  You'll need
  548.           to create one backup file for each disk.  It's fine to leave
  549.           this on the hard disk so that it ends up on the backup; you
  550.           don't need to have it on floppy disk.
  551.  
  552.         WHEN YOUR DISK FAILS:
  553.  
  554.         Depending on the reason for your disk failure, you may be able
  555.         to skip some of the early steps here.  Read them over, and
  556.         figure out where to start.  If you have to, you can start again,
  557.         so the only thing you lose by starting too far down is time.
  558.  
  559.           1. Make any necessary repairs to your hardware.
  560.  
  561.           2. Boot from your Startup disk, and use FDISK to partition
  562.           your disk.  Use "FORMAT c: /s" to reformat the disk and
  563.           transfer the system files to it.
  564.  
  565.           NOTE:  If you want to maintain the ability to boot to your old
  566.           DOS version, I've been told that the Startup disk's FDISK will
  567.           cause problems for you.  You should boot the old DOS version
  568.           and use its FDISK to partition your disk, and then reboot from
  569.           the startup disk and use "SYS c:" to transfer the Win95 system
  570.           files.  After that, you can continue as before.
  571.  
  572.           3. (Optional) Transfer your tape backup software to your hard
  573.           disk.
  574.  
  575.           4. If you're not planning to use Drivespace, you can skip down
  576.           to step 8.
  577.  
  578.           5. If you want to compress your drive, you need to restore
  579.           enough of Win95 to run Drivespace.  Don't restore the whole
  580.           disk; you might not have room for it.  For most people,
  581.           restoring the files in the root directory and the files in the
  582.           Windows directory should be enough.  If you have any essential
  583.           drivers in other directories, you'll need to restore them too.
  584.           Finally, you should restore DOSLFNBK and the data file(s)
  585.           containing the backed up long filenames.
  586.  
  587.           IMPORTANT:  You should not overwrite IO.SYS, but you *should*
  588.           overwrite MSDOS.SYS.  It is a hidden read-only file in your
  589.           root directory.  A good way is to erase MSDOS.SYS before
  590.           starting the restore (use ATTRIB from the Startup disk to
  591.           remove the System, Hidden, Read-only attributes), and then
  592.           tell your restore program not to overwrite existing files.
  593.  
  594.           Restore all those files now.
  595.  
  596.           6. Restore the long filenames by running
  597.  
  598.              DOSLFNBK c:\ /R /V /F backupfilename
  599.  
  600.           7. Remove the Startup disk, and reboot your system.  You may
  601.           get some errors about missing drivers (e.g. no sound card
  602.           drivers), but things should basically work.  Run DriveSpace to
  603.           compress your drives the way you want.
  604.  
  605.           8. Reboot your system in DOS mode or from the Startup disk.
  606.  
  607.           9. Restore all rest of the files on all of your disks from the
  608.           backup now.  See the "IMPORTANT" note in step 5 about
  609.           MSDOS.SYS and IO.SYS.
  610.  
  611.           10. Restore all the rest of your long filenames by running
  612.  
  613.              DOSLFNBK c:\ /R /V /F backupfilename
  614.  
  615.           and if you've also got a D: partition,
  616.  
  617.              DOSLFNBK d:\ /R /V /F backupfilename
  618.  
  619.           You may get messages about some long filenames already
  620.           existing from your first restore; don't worry about those.
  621.  
  622.           11. Some restore programs set the archive bit on all restored
  623.           files; you might want to turn it off (since you've still got
  624.           those files backed up) at this point.
  625.  
  626.         Reboot your system, and things should be back as they were when
  627.         you did your backup!
  628.  
  629. 7. License:
  630.  
  631.         DOSLFNBK is *not* public domain software.  Releases up to
  632.         version 1.6 were freeware, and you may use them at
  633.         no charge.  However, the current release is shareware.  You may
  634.         use it at no charge for an evaluation period
  635.         of 30 days only.
  636.  
  637.         You are free to distribute unmodified copies of the complete
  638.         DOSLFNBK package, provided your total charge is no more than $1.
  639.         The total cost of a compilation (e.g. a CD ROM) including
  640.         DOSLFNBK must be no more than $1 per package in the compilation.
  641.  
  642.         To continue to use DOSLFNBK beyond the 30 day evaluation period,
  643.         you must register it.  There are three possible registration
  644.         levels available:
  645.  
  646.           $10 simple registration + $5 handling charge
  647.  
  648.         This registration fee gives you a license to use one copy of
  649.         DOSLFNBK indefinitely.  If you include an email address when you
  650.         register I will notify you of new versions and how to obtain
  651.         them yourself. I'll also attempt to answer emailed questions
  652.         about DOSLFNBK from registered users. Payment may be made in
  653.         Canadian or US dollars (at par), or the UKP equivalent of $15
  654.         US.  NOTE:  See below for how to avoid the handling charge.
  655.  
  656.           $20 upgrade registration + $5 handling charge
  657.  
  658.         This registration fee also entitles you to use DOSLFNBK
  659.         indefinitely.  In addition to the license to use it, I will mail
  660.         you a diskette containing the latest version, together with a
  661.         collection of other freeware and (unregistered) shareware
  662.         programs that I have written (including LFNSORT).  If you send
  663.         an email address I will notify you of updates, and send one free
  664.         update by email if you request it.  Payment may be made in
  665.         Canadian or US dollars (at par), or the GBP (Sterling)
  666.         equivalent of $25 US.
  667.  
  668.           $45 source code registration + $5 handling charge
  669.  
  670.         DOSLFNBK was written in Borland Pascal 7.01, using the excellent
  671.         Object Professional library from TurboPower Software.  In
  672.         addition to the benefits of the upgrade registration, the source
  673.         code registration gives you the DOSLFNBK source code (including
  674.         an object-oriented low-level disk access unit, access to the new
  675.         Win95 DOS API functions, and a huge memory support unit, but not
  676.         OPro).  Payment may be made in Canadian or US dollars (at par),
  677.         or the GBP equivalent of $50 US.
  678.  
  679.         Any of the registrations can be done by sending a cheque or
  680.         money order to:
  681.  
  682.          Duncan Murdoch
  683.          337 Willingdon Ave.
  684.          Kingston, Ontario, Canada.
  685.          K7L 4J3
  686.  
  687.         NOTE 1:  If you send a $10 simple registration order directly to
  688.         me at this address, I will waive the handling fee.  Send a
  689.         cheque or money order for $10 in Canadian or US dollars, or the
  690.         UKP equivalent of $10 US.
  691.  
  692.         NOTE 2:  I will be overseas until June 1997. During this time I
  693.         will still fill orders, but there are almost certain to be
  694.         delays if you mail your order to my Kingston address.
  695.  
  696.         You can also register or order source code from the Public
  697.         (software) Library (PsL) using MC, Visa, AmEx, or Discover card:
  698.           - by calling 800-242-4775 (US only)
  699.           - by calling 713-524-6394
  700.           - by faxing your order to 713-524-6398
  701.           - by sending your order by Compuserve to 71355,470
  702.           - by sending your order by Internet to
  703.             71355.470@compuserve.com
  704.           - online at http://www.pair.com/dmurdoch/programs/doslfnbk
  705.  
  706.         PsL only accepts payment in US dollars. Please give PsL your
  707.         name exactly as it appears on the card, and tell them your
  708.         card's expiry date. DOSLFNBK is PsL product #14247.
  709.  
  710.         The PsL numbers are for ordering only.  I *cannot* be reached at
  711.         the PsL numbers.  To contact me for information about dealer
  712.         pricing, volume discounts, site licensing, the status of
  713.         shipment of the product, the latest version number or for
  714.         technical information, write to me at the address above or the
  715.         email address below.  I'd especially like to hear bug reports
  716.         and suggestions for improvements.
  717.  
  718.          Internet:   dmurdoch@mast.queensu.ca or dmurdoch@pair.com
  719.  
  720. 8. Release history:
  721.  
  722.        0.0 - first beta test version
  723.        0.1 - kept file attributes of existing file during restore.
  724.        0.2 - made messages more informative; fixed bug in handling
  725.              erased file entries; added check of overwrite of backup
  726.              file; changed default name of backup file to BACKUP.LFN and
  727.              made LFN the default backup extension; added /P option.
  728.        0.3 - fixed memory leak that caused run-time error 203 on large
  729.              restore
  730.        0.4 - added check for successful write of backup file, added
  731.              /force option.
  732.        0.5 - added report of memory use, /d option, many debugging messages
  733.        0.6 - cleaned up messages and debug log, removed disk size
  734.              restriction, added progress dots for non-verbose runs.
  735.        1.0 - first public release --- same as 0.6
  736.        1.1 - unauthorized release
  737.        1.2 - documentation changes and addition of /s option
  738.        1.3 - improved memory management, stopped use of obsolete DOS
  739.              service 1C, speeded up directory expansion on restore
  740.        1.4 - added /L option, support for relative path on command line,
  741.              internal drive locking, support for SUBST etc.  Changed
  742.              exit codes to be compatible with LFNSORT.
  743.        1.5 - public release, same as 1.4c
  744.        1.6 - fixed bug in handling volume labels
  745.        1.7 - added integrity checks of disk structure,
  746.              backup/restore/display of file attributes, checks for
  747.              existence of backed up files, changed from freeware to
  748.              shareware, /o option.
  749.        1.9 - fixed display of some special characters, added FAT32 support,
  750.              added /from and /all options, added support for non-IOCTL drives
  751.        2.0 - fixed bug with FAT32 drives, bug with swapfile
  752.        2.1 - fixed bug with very large diretories
  753.  
  754. 9. Acknowledgments
  755.  
  756.         DOSLFNBK was written based on the information in Robert Hummel's
  757.         article on Win95 long filenames in the June/July 1995 issue of
  758.         PC Techniques Magazine.  Thanks are due to the beta testers, who
  759.         suggested many improvements, and several of whom were put to
  760.         considerable inconvenience by early versions that messed up
  761.         their disks.  M. Guffey made a lot of useful suggestions for
  762.         improvements to the documentation.  Several people sent me
  763.         details of working with XCOPY; some of them are included here in
  764.         the XCOPY.TXT file.
  765.